package com.security.door.service.Impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.security.door.core.base.BaseService;
import com.security.door.dao.mapper.crAreaMapper;
import com.security.door.model.domain.crArea;
import com.security.door.model.dto.crAreaDto;
import com.security.door.service.IcrAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class crAreaServiceImpl extends BaseService<crArea> implements IcrAreaService {

    @Autowired
    crAreaMapper icrAreaMapper;

    public PageInfo<crArea> queryListWithPage(crAreaDto entity) {
        PageHelper.startPage(entity.getPageIndex(), entity.getPageSize());
        var actionList = icrAreaMapper.queryListWithPage(entity);
        return new PageInfo<>(actionList);
    }

    public crArea selectByAreaCode(String areaCode) {
        return icrAreaMapper.selectByAreaCode(areaCode);
    }

}